import { View, Text } from '@tarojs/components'
import Taro from '@tarojs/taro'
import './HeadBar.scss'

const HeadBar = ({ title }) => {
  const goBack = () => {
    Taro.navigateBack()
  }

  return (
    <View className='pageTitle'>
      <Text onClick={goBack} className='goBack'>
        {'<'}
      </Text>
      {title}
    </View>
  )
}

export default HeadBar